package com.buer.storage.dao;

import com.buer.storage.dto.*;
import com.buer.storage.entity.*;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Repository
public interface AorderDao {
    //订单入库
    int insertAorder(AorderStorageDto aorderStorageDto);

    int insertBatch(AorderdetailsDto aorderdetailsDto);
    int updateBatch(BatchAllotDto batchAllotDto);
    int deleteBatch(BatchAllotDto batchAllotDto);
    int update(AllotBatchDto allotBatchDto);

    List<AorderDto> selectByAll(Map<String, Object> map);

    //商品入库
    int insertAorderdetails(@Param(value="arrary") AorderdetailsDto[] aorderPutProds);

    //查询调拨表
    List<AorderSelectDto> findAorderAll(Integer allotId);

     //根据调拨表ID查询调拨详情信息
    List<AorderdetailsDto> findAorderdetailsAllById(Integer allotId);

    //查询调拨信息表
    List<AorderDto> findAorder();

    //根据调拨表id删除调拨信息
    int deleteAorderById(int allotId);


    void deleteAorderByPutId(Integer allotId);

    void deleteAorderDetailsByPutId(Integer allotId);


    AorderdetailsDto[] findAordertailsAll(Integer allotId);

    int deleteStock(int stockId);

    Stock queryBuerStockByParam(AorderdetailsDto putProd);

    int updateAddSumStock(Stock stock);

    int updateAwaitNum(Stock stock);
    int updateR(AorderdetailsDto aorderdetailsDto);

    int updateStatus(Integer allotId);

    List<AorderDto> getAord(Map<String, Object> map);
    List<AorderdetailsDto> getAorderdetails(Map<String, Object> map);
}
